<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
<title>EJC - Encontro de Jovens com Cristo</title>
</head>
<body onload="javascript:window.print()">
	<div
		style="font-size: 25px; font-weight: bold; width: 700px; text-align: center; padding-top: 50px; padding-bottom: 50px;">
		Calendário</div>

	<table border="1" cellpadding="2"
		style="border: 1px solid #cccccc; border-collapse: collapse; width: 700px;">

		<tr style="background-color: #000000; color: #FFFFFF;">
			<th width="100">Evento</th>
			<th width="50">Local</th>
			<th width="20">Data</th>
			<th width="20">Hora</th>
			<th width="50">Detalhes</th>
		</tr>

		<g:set var="index" value="${0 }" />
	<g:each in="${session.calendarioResult}" status="i" var="evento">
	<g:set var="ehImpar" value="${true}" />
   	<g:if test="${index % 2 == 0}"><g:set var="ehImpar" value="${false}" /></g:if>
   	
   	<tr
   	<g:if test="${ehImpar}"> bgcolor="#eeeeee"</g:if>
   	>
   	
   		<td>${evento.nome}</td>
   		<td>${evento.local}</td>
   		<td align="center">${evento.dataEHora.date}.<g:if test="${evento.dataEHora.month < 10 }">0</g:if>${evento.dataEHora.month}.${evento.dataEHora.year + 1900}</td>
   		<td align="center"><g:if test="${evento.dataEHora.hours < 10 }">0</g:if>${evento.dataEHora.hours}:<g:if test="${evento.dataEHora.minutes < 10 }">0</g:if>${evento.dataEHora.minutes}</td>
   		<td align="center">${evento.detalhes}</td></tr>
   	
   	<g:set var="index" value="${index + 1}" />
   	
   	</g:each>
	</table>
	
</body>
</html>